//循环队验测试

#include "iostream"
#include "xvnhuanduilie.h"

using namespace std;

template<typename E, int M>
void PrintQueue(SqQueue<E, M> Q)
{
    cout << "<- ";
    for(int i = Q.front; i != Q.rear; i++)
    {
        cout << Q.elem[i] << ",";
    }
    cout << "<-" << endl;
}

int main()
{
    SqQueue<int, 10> Q;
    InitQueue(Q);
    PrintQueue(Q);

    EnQueue(Q, 1);
    EnQueue(Q, 2);
    EnQueue(Q, 3);
    EnQueue(Q, 4);
    PrintQueue(Q);

    int e;
    DeQueue(Q, e);
    PrintQueue(Q);

    GetHead(Q, e);
    PrintQueue(Q);
    
    return 0;
}